using System;
using System.Collections;
using System.Collections.Generic;
using LL.Data.Mapping;

namespace NanoERP.Model
{
	/// <summary>
	/// 仓库信息
	/// </summary>
	[Serializable]
	public sealed class Storageinfo 
	{
		#region Private Members
		
		// Variabili di stato
		private bool _isChanged;

		// Primary Key(s) 
		private long _id; 
		
		// Properties 
		private string _stoname; 
		private string _stono; 
		private string _stopym;
        private int? _stotype; 
		private string _note; 
		private DateTime? _createdate; 
		private long? _createuserid; 
		private int? _tag; 		

		#endregion
		
		#region Default ( Empty ) Class Constructor
		
		/// <summary>
		/// default constructor
		/// </summary>
		public Storageinfo()
		{
			_id = 0; 
			_stoname = null; 
			_stono = null; 
			_stopym = null; 
			_stotype = null; 
			_note = null;  
			_createdate = DateTime.Now; 
			_createuserid = null; 
			_tag = null;
		}
		
		#endregion // End of Default ( Empty ) Class Constructor
		
		#region Full Constructor
		
		/// <summary>
		/// full constructor
		/// </summary>
        public Storageinfo(long id, string stoname, string stono, string stopym, int? stotype, string note, DateTime? createdate, long? createuserid, int? tag)
		{
			_id = id; 
			_stoname = stoname; 
			_stono = stono; 
			_stopym = stopym; 
			_stotype = stotype; 
			_note = note; 
			_createdate = createdate; 
			_createuserid = createuserid; 
			_tag = tag; 
		}
		
		#endregion // End Full Constructor

		#region Public Properties
			
		/// <summary>
		/// 
		/// </summary>		
		public long Id
		{
			get { return _id; }
			set { _isChanged |= (_id != value); _id = value; }
		} 
	  
		/// <summary>
		/// 仓库名称
		/// </summary>		
		public string Stoname
		{
			get { return _stoname; }
			set	
			{
				if ( value != null )
					if( value.Length > 255)
						throw new ArgumentOutOfRangeException("Invalid value for Stoname", value, value.ToString());
				
				_isChanged |= (_stoname != value); _stoname = value;
			}
		} 
	  
		/// <summary>
		/// 仓库编号
		/// </summary>		
		public string Stono
		{
			get { return _stono; }
			set	
			{
				if ( value != null )
					if( value.Length > 255)
						throw new ArgumentOutOfRangeException("Invalid value for Stono", value, value.ToString());
				
				_isChanged |= (_stono != value); _stono = value;
			}
		} 
	  
		/// <summary>
		/// 拼音码
		/// </summary>		
		public string Stopym
		{
			get { return _stopym; }
			set	
			{
				if ( value != null )
					if( value.Length > 255)
						throw new ArgumentOutOfRangeException("Invalid value for Stopym", value, value.ToString());
				
				_isChanged |= (_stopym != value); _stopym = value;
			}
		} 
	  
		/// <summary>
		///'仓库类别'
		/// </summary>		
        public int? Stotype
		{
            get { return _stotype; }
			set { _isChanged |= (_stotype != value); _stotype = value; }
		}

        /// <summary>
        /// 仓库类别名称
        /// </summary>
        [IgnoreAttribute()]
        public string StotypeName { get; set; }
	  
		/// <summary>
		/// 备注
		/// </summary>		
		public string Note
		{
			get { return _note; }
			set	
			{
				if ( value != null )
					if( value.Length > 2000)
						throw new ArgumentOutOfRangeException("Invalid value for Note", value, value.ToString());
				
				_isChanged |= (_note != value); _note = value;
			}
		} 
	  
		/// <summary>
		/// 创建日期
		/// </summary>		
		public DateTime? Createdate
		{
			get { return _createdate; }
			set { _isChanged |= (_createdate != value); _createdate = value; }
		} 
	  
		/// <summary>
		/// 创建人ID
		/// </summary>		
		public long? Createuserid
		{
			get { return _createuserid; }
			set { _isChanged |= (_createuserid != value); _createuserid = value; }
		} 
	  
		/// <summary>
		/// 标记
		/// </summary>		
		public int? Tag
		{
			get { return _tag; }
			set { _isChanged |= (_tag != value); _tag = value; }
		} 
		
		#endregion 
	}
}